public class rmb {
    public static String toString(double x) {
        String a = new String();
        long b = (long)(x * 100);
        int count = 1;
        String d = new String();
        while(b != 0) {
            if(b%10 == 0){
                d = "零";
            }
            if(b%10 == 1){
                d = "壹";
            }
            if(b%10 == 2){
                d = "贰";
            }
            if(b%10 == 3){
                d = "叁";
            }
            if(b%10 == 4){
                d = "肆";
            }
            if(b%10 == 5){
                d = "伍";
            }
            if(b%10 == 6){
                d = "陆";
            }
            if(b%10 == 7){
                d = "柒";
            }
            if(b%10 == 8){
                d = "捌";
            }
            if(b%10 == 9){
                d = "玖";
            }
            if(count == 1){
                a=d+"分";
            }
            if(count == 2) {
                a=d+"角"+a;
            }
            if(count == 3) {
                a=d+"元"+a;
            }
            if(count == 4) {
                a=d+"拾"+a;
            }
            if(count == 5) {
                a=d+"佰"+a;
            }
            count++;
            b/=10;
        }
        return a;
    }
    public static void main(String[] args) {
        String a=toString(456.12);
        System.out.println(a);
    }
}
